package com.cmf.myproject.dal.mybatis.model;

import com.cmf.myproject.dal.mybatis.enums.SysResourceTypeEnum;
import java.io.Serializable;
import java.util.Date;

public class SysResource implements Serializable {
    /**
     * 
     * @mbggenerated
     */
    private Long id;

    /**
     * 父资源ID
     * @mbggenerated
     */
    private Long parentResourceId;

    /**
     * 资源名称
     * @mbggenerated
     */
    private String name;

    /**
     * 资源类型
     * @mbggenerated
     */
    private SysResourceTypeEnum type;

    /**
     * 资源代码
     * @mbggenerated
     */
    private String permission;

    /**
     * 链接
     * @mbggenerated
     */
    private String url;

    /**
     * 节点是否初始展开，默认 false
     * @mbggenerated
     */
    private Boolean spread;

    /**
     * 
     * @mbggenerated
     */
    private Date createTime;

    /**
     * 
     * @mbggenerated
     */
    private Date updateTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table sys_resource
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * 
     * @mbggenerated
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     * @param id 
     * @mbggenerated
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 父资源ID
     * @mbggenerated
     */
    public Long getParentResourceId() {
        return parentResourceId;
    }

    /**
     * 父资源ID
     * @param parentResourceId 父资源ID
     * @mbggenerated
     */
    public void setParentResourceId(Long parentResourceId) {
        this.parentResourceId = parentResourceId;
    }

    /**
     * 资源名称
     * @mbggenerated
     */
    public String getName() {
        return name;
    }

    /**
     * 资源名称
     * @param name 资源名称
     * @mbggenerated
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 资源类型
     * @mbggenerated
     */
    public SysResourceTypeEnum getType() {
        return type;
    }

    /**
     * 资源类型
     * @param type 资源类型
     * @mbggenerated
     */
    public void setType(SysResourceTypeEnum type) {
        this.type = type;
    }

    /**
     * 资源代码
     * @mbggenerated
     */
    public String getPermission() {
        return permission;
    }

    /**
     * 资源代码
     * @param permission 资源代码
     * @mbggenerated
     */
    public void setPermission(String permission) {
        this.permission = permission == null ? null : permission.trim();
    }

    /**
     * 链接
     * @mbggenerated
     */
    public String getUrl() {
        return url;
    }

    /**
     * 链接
     * @param url 链接
     * @mbggenerated
     */
    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    /**
     * 节点是否初始展开，默认 false
     * @mbggenerated
     */
    public Boolean getSpread() {
        return spread;
    }

    /**
     * 节点是否初始展开，默认 false
     * @param spread 节点是否初始展开，默认 false
     * @mbggenerated
     */
    public void setSpread(Boolean spread) {
        this.spread = spread;
    }

    /**
     * 
     * @mbggenerated
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 
     * @param createTime 
     * @mbggenerated
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 
     * @mbggenerated
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     * @param updateTime 
     * @mbggenerated
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_resource
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", parentResourceId=").append(parentResourceId);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", permission=").append(permission);
        sb.append(", url=").append(url);
        sb.append(", spread=").append(spread);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}